{* $Id$ *}
{include_core file="admin/lib/header.html" title="C100眼镜报名列表"}
  <style>
  .table-div{
    padding:30px;
    padding-top:15px;
    padding-bottom:0px;
  }
  .table-div table td{
    padding:10px;
    border: 1px solid rgb(233,233,233);
  }
  .table-div table th{
    padding:3px;
    border: 1px solid rgb(233,233,233);
    text-align: center;
    font-weight: bolder;
    background: rgb(246,246,246);
  }
  .table-div table tr th.goods-title{
    min-width: 200px;
    max-width:300px;
  }
  .table-div table tr th.goods-cover{
    width:70px;
    padding:3px;
  }
  .table-div table tr td.refund-edit span{
    float: left;
    margin-right:10px;
  }
</style>
  <div class="page-header border-bottom clearfix">
    <h2 class="left">C100眼镜报名</h2>
    <a style="margin-top:5px; display:block; float:right;" href="{AnUrl("events/admin/newglass_apply?status=$status&is_excel=1")}" class="btn btn-xs btn-primary">导出EXCEL</a>
  </div>
  <div class="search-level1 clearfix">
    <form action="events/admin/newglass_apply" method="get">
      <input type="hidden" name="status" value="{$status}">
      <input type="text" class="left" name="search_filter[name]" value="{$search_filter.name}">
      <button type="submit" class="btn btn-success btn-sm left">搜索</button>
    </form>
  </div>
  
  <!--start:列表-->
  <table class="list-table">
    <caption>按状态：
      <a href='{AnUrl("events/admin/newglass_apply?status=1")}' {if $status == 1} class="label label-primary" {else} class="label label-default" {/if}>正常</a>
      <a href='{AnUrl("events/admin/newglass_apply?status=0")}' {if $status == 0} class="label label-primary" {else} class="label label-default" {/if}>已禁用</a>
    </caption>
    <thead><tr>
      {if $status == 1}
      <th style="width:20px;"><input type="checkbox" class="selectAll"></th>
      {/if}
      <th style="width:60px;">名字</th>
      <th style="width:60px;">联系方式</th>
      <th style="width:100px;">地址</th>
      <th style="width:100px;">工作</th>
      <th style="width:30px;">年龄</th>
      <th style="width:100px;">报名时间</th>
      <th style="width:60px;">操作</th>
    </tr></thead>
    <tbody>
      {foreach $newglass_list as $k=>$v}
        <tr id="dataList{$v.id}" {if $k%2 == 1} class="bg-gray"{/if} data-id="{$v.id}">
          {if $status == 1}
            <td><input type="checkbox" class="listSelect"></td>
          {/if}
          <td>{$v.name}</td>
          <td>{$v.mobile}</td>
          <td>{$v.address}</td>
          <td>{$v.job}</td>
          <td>{$v.age}</td>
          <td>{$v.add_time}</td>
          <td>
            <div class="js_data_{$v.id} hidden">
              <div class="table-div">
              <table class="table" cellpadding="0" cellspacing="0">
                <tbody>
                <tr>
                  <th width="150px">其他信息</th>
                  <th colspan="6"></th>
                </tr>
                <tr>
                  <td width="150px">微信号:</td>
                  <td colspan="6">
                    {$v.wxnumber}
                  </td>
                </tr>
                <tr>
                  <td width="150px">微博号:</td>
                  <td colspan="6">
                    {$v.sinanumber}
                  </td>
                </tr>
                <tr>
                  <td width="150px">曾参与NBD线下活动:</td>
                  <td colspan="6">
                    {$v.activity}
                  </td>
                </tr>
                <tr>
                  <td width="150px">文章:</td>
                  <td colspan="6">
                    {$v.essay}
                  </td>
                </tr>
                <tr>
                  <td width="150px">行业看法:</td>
                  <td colspan="6">
                    {$v.viewpoint}
                  </td>
                </tr>
                <tr>
                  <td width="150px">专业性内容:</td>
                  <td colspan="6">
                    {$v.professional}
                  </td>
                </tr>
                </tbody>
              </table>
            </div>
            </div>
            <a class="btn btn-success btn-xs js_details" data-id="{$v.id}"><i class="icon-trash icon-white"></i>查看详情</a>
            {if $status == 1}
              <a href="{AnUrl("events/admin/newglass_apply/newglass_delete?id={$v.id}")}" class="btn btn-danger btn-xs deleteOne"><i class="icon-trash icon-white"></i>禁用</a>
            {elseif $status == 0}
              <a href="{AnUrl("events/admin/newglass_apply/newglass_change_status?status=1")}" class="btn btn-success btn-xs changeStatus"><i class="icon-trash icon-white"></i>恢复</a>
              <a href="{AnUrl("events/admin/newglass_apply/newglass_delete?id={$v.id}")}" class="btn btn-danger btn-xs deleteOne"><i class="icon-trash icon-white"></i>删除</a>
            {/if}
          </td>
        </tr>
      {foreachelse}
          <tr><td class="txtleft" colspan="8">暂无数据</td></tr>
      {/foreach}
    </tbody>
    {if $status == 1}
    <tfoot><tr><td><input type="checkbox" class="selectAll"></td><td colspan="7"><a href="{AnUrl("events/admin/newglass_apply/newglass_delete")}" class="btn btn-danger btn-xs deleteAll">批量禁用</a></td></tr></tfoot>
    {/if}
  </table>
  <script type="text/javascript">
  $(function(){
    $('.js_details').click(function(){
      var id = $(this).data('id');
      var data = $('.js_data_'+id).html();
      ace.dialog({
        'title':'报名详情',
        'content':data,
        'width':1000,
        'cancel':function(){
          $('.aceDialog').hide();
        }
      })
    });
  });
  </script>
  {include_core file="admin/lib/pager.html"}
<!--end:列表-->
{load_js file='zclip/jquery.zclip.min.js'}
{load_js file='zclip/ZeroClipboard.js'}
{include_core file="admin/lib/footer.html"}